<@_metadata path=path><#assign metadata=object/></@_metadata>
<#macro getAction code description=''>onclick="${editor!'cmsTemplateEditor'}.replaceSelection('<#if description?has_content><#${r'--'} ${description} ${'--'}>\n</#if>${code?js_string}${description?has_content?then('\\n','')}');$.pdialog.closeCurrent();return false;"</#macro>
<div class="tabs">
	<div class="tabsHeader">
		<div class="tabsHeaderContent">
			<ul>
				<li><a href="javascript:;">输出变量</a></li>
				<li><a href="javascript:;">常用指令</a></li>
				<li><a href="javascript:;">常用方法</a></li>
				<li><a href="javascript:;">配置参数</a></li>
				<li><a href="javascript:;">模板片段</a></li>
			</ul>
		</div>
	</div>
	<div class="tabsContent">
		<div class="pageFormContent" layoutH="37">
			<ul class="tree treeFolder">
			<#if metadata?has_content>
				<li>
					<a href="javascript:;">模板属性</a>
					<ul>
						<li><a href="javascript:;" <@getAction r'${(metadata.alias)!}'/>>模板名称</a></li>
				<#if metadata.useDynamic?has_content&&metadata.useDynamic&&metadata.acceptParamters?has_content>
					<#list metadata.acceptParamters?split(',') as paramter>
						<li><a href="javascript:;" <@getAction r'${('+paramter+r')!}'/>>参数:${paramter}</a></li>
					</#list>
				</#if>
				<#if metadata.extendList?has_content>
					<#list metadata.extendList as extend>
						<li><a href="javascript:;" <@getAction r'${(metadata.extendData.'+extend.id.code+r')!}'/>>扩展字段:${extend.name}</a></li>
					</#list>
				</#if>
					</ul>
				</li>
			</#if>
			<#if metadata.useStatic?has_content&&site.useStatic>
				<li>
					<a href="javascript:;">静态化内容模板数据</a>
					<ul>
						<li><a href="javascript:;" <@getAction r'${(content.title)!}'/>>内容标题</a></li>
						<li><a href="javascript:;" <@getAction r'${(content.url)!}'/>>链接地址</a></li>
					</ul>
				</li>
				<li>
					<a href="javascript:;">静态化分类模板数据</a>
					<ul>
						<li><a href="javascript:;" <@getAction r'${(category.title)!}'/>>分类名称</a></li>
						<li><a href="javascript:;" <@getAction r'${(category.url)!}'/>>链接地址</a></li>
					</ul>
				</li>
				<li>
					<li><a href="javascript:;" <@getAction r'${url!}'/>>静态化页面当前页面路径</a></li>
				</li>
			</#if>
				<li>
					<a href="javascript:;">站点属性</a>
					<ul>
						<li><a href="javascript:;" <@getAction r'${site.id!}'/>>站点ID</a></li>
						<li><a href="javascript:;" <@getAction r'${site.name!}'/>>站点名称</a></li>
						<li><a href="javascript:;" <@getAction r'${site.useStatic?string}'/>>启用静态化</a></li>
						<li><a href="javascript:;" <@getAction r'${site.sitePath!}'/>>静态站点访问地址</a></li>
						<li><a href="javascript:;" <@getAction r'${site.useSsi?string}'/>>启用服务器端包含</a></li>
						<li><a href="javascript:;" <@getAction r'${site.dynamicPath!}'/>>动态站点访问地址</a></li>
						<li><a href="javascript:;" <@getAction r'${site.disabled?string}'/>>已禁用</a></li>
					</ul>
				</li>
			</ul>
		</div>
		<div class="pageFormContent" layoutH="37">
			<ul class="tree treeFolder">
				<li>
					<a href="javascript:;">获取数据列表</a>
					<ul>
						<li><a href="javascript:;" <@getAction r'<@_contentList categoryId=categoryId containChild=containChild modelId=modelId parentId=parentId onlyUrl=onlyUrl hasImages=hasImages hasFiles=hasFiles orderField=orderField orderType=orderType pageIndex=pageIndex count=count><#list page.list as a><a href="${a.url!}">${a.title}</a></#list></@_contentList>' 'categoryId:分类ID,containChild:包含子分类内容,modelId:模型ID,parentId:父内容ID,onlyUrl:["true":仅外链,"false":非外链,默认全部],hasImages:["true":仅图集,"false":非图集,默认全部],hasFiles:["true":仅带附件,"false":非带附件,默认全部],orderField:排序字段["scores":分数,"comments":评论,"clicks":点击,默认发布日期],orderType:排序类型["asc":正序,"desc":倒序],pageIndex:页码,count:每页数据条数'/>>内容</a></li>
						<li><a href="javascript:;" <@getAction r'<@_contentFileList contentId=contentId image=image orderField=orderField orderType=orderType pageIndex=pageIndex count=count><#list page.list as a>${a.filePath}</#list></@_contentFileList>' 'orderField:排序字段["size":大小,"click":点击,默认排序字段顺序],orderType:排序类型["asc":正序,"desc":倒序],pageIndex:页码,count:每页数据条数'/>>内容附件</a></li>
						<li><a href="javascript:;" <@getAction r'<@_categoryList parentId=parentId typeId=typeId allowContribute=allowContribute pageIndex=pageIndex count=count><#list page.list as a><a href="${a.url!}">${a.name}</a></#list></@_categoryList>' 'parentId:负分类ID,typeId:分类类型ID,allowContribute:["true":允许投稿,"false":不允许投稿,默认全部],pageIndex:页码,count:每页数据条数'/>>分类</a></li>
						<li><a href="javascript:;" <@getAction r'<@_categoryTypeList pageIndex=pageIndex count=count><#list page.list as a><a href="${a.url!}">${a.name}</a></#list></@_categoryTypeList>' 'pageIndex:页码,count:每页数据条数'/>>分类类型</a></li>
						<li><a href="javascript:;" <@getAction r'<@_placeList path=path orderField=orderField orderType=orderType pageIndex=pageIndex count=count><#list page.list as a><a href="${a.url!}">${a.title}</a></#list></@_placeList>'/>>推荐位内容</a></li>
						<li><a href="javascript:;" <@getAction r'<@_search word=word tagId=tagId pageIndex=pageIndex count=count><#list page.list as a><a href="${a.url!}">${a.title}</a></#list></@_search>'/>>搜索</a></li>
						<li><a href="javascript:;" <@getAction r'<@_facetSearch word=word tagId=tagId categoryId=categoryId modelId=modelId pageIndex=pageIndex count=count><#list page.list as a><a href="${a.url!}">${a.title}</a></#list></@_facetSearch>'/>>高级搜索</a></li>
						<li><a href="javascript:;" <@getAction r'<@_modelList parentId=parentId hasChild=hasChild onlyUrl=onlyUrl hasImages=hasImages hasFiles=hasFiles><#list page.list as a>${a.id}:${a.name}<#sep>,</#list></@_modelList>'/>>模型</a></li>
					</ul>
				</li>
				<li>
					<a href="javascript:;">获取单条/多条数据</a>
					<ul>
						<li><a href="javascript:;" <@getAction r'<@_content id=id><a href="${object.url!}">${object.title}</a></@_content>'/>>内容</a></li>
						<li><a href="javascript:;" <@getAction r'<@_content ids=ids><#list map?keys as k><a href="${map[k].url!}">${map[k].title}</a><#sep>,</#list></@_content>'/>>多条内容</a></li>
						<li><a href="javascript:;" <@getAction r'<@_category id=id><a href="${object.url!}">${object.name}</a></@_category>'/>>分类</a></li>
						<li><a href="javascript:;" <@getAction r'<@_category ids=ids><#list map?keys as k><a href="${map[k].url!}">${map[k].name}</a><#sep>,</#list></@_category>'/>>多个分类</a></li>
						<li><a href="javascript:;" <@getAction r'<@_tag id=id>${object.name}</@_tag>'/>>标签</a></li>
						<li><a href="javascript:;" <@getAction r'<@_tag ids=ids><#list map?keys as k>${map[k].name}<#sep>,</#list></@_tag>'/>>多个标签</a></li>
						<li><a href="javascript:;" <@getAction r'<@_sysUser id=id>${object.nickName}</@_sysUser>'/>>用户</a></li>
						<li><a href="javascript:;" <@getAction r'<@_sysUser ids=ids><#list map?keys as k>${map[k].nickName}<#sep>,</#list></@_sysUser>'/>>多个用户</a></li>
					</ul>
				</li>
				<li>
					<a href="javascript:;">工具指令</a>
					<ul>
					<#if metadata.useStatic?has_content&&site.useStatic>
						<li><a href="javascript:;" <@getAction r'<@_createCategoryFile id=id templatePath=templatePath filePath=filePath pageIndex=pageIndex>${url}<@_createCategoryFile>'/>>生成静态化分类页面</a></li>
						<li><a href="javascript:;" <@getAction r'<@_createContentFile id=id templatePath=templatePath filePath=filePath pageIndex=pageIndex>${url}<@_createContentFile>'/>>生成静态化内容页面</a></li>
						<li><a href="javascript:;" <@getAction r'<@_createTemplateFile templatePath=templatePath filePath=filePath pageIndex=pageIndex>${url}<@_createTemplateFile>'/>>生成静态化页面</a></li>
					</#if>
					</ul>
				</li>
			</ul>
		</div>
		<div class="pageFormContent" layoutH="37">
			<ul class="tree treeFolder">
				<li>
					<a href="javascript:;">获取扩展数据</a>
					<ul>
						<li><a href="javascript:;" <@getAction r'<#assign arrtibute=getContentAttribute(contentId)/>' '内容扩展数据(参数为内容Id)'/>>内容扩展数据</a></li>
						<li><a href="javascript:;" <@getAction r'<#assign arrtibuteMap=getContentAttributes(contentIds)/>' '多个内容扩展数据(参数为多个内容ID以逗号分隔组成的字符串)'/>>多个内容扩展数据</a></li>
						<li><a href="javascript:;" <@getAction r'<#assign arrtibute=getCategoryAttribute(categoryId)/>' '分类扩展数据(参数为分类ID)'/>>分类扩展数据</a></li>
						<li><a href="javascript:;" <@getAction r'<#assign arrtibuteMap=getCategoryAttributes(categoryIds)/>' '多个分类扩展数据(参数为多个分类ID以逗号分隔组成的字符串)'/>>多个分类扩展数据</a></li>
						<li><a href="javascript:;" <@getAction r'<#assign arrtibute=getPlaceAttribute(placeId)/>' '推荐位扩展数据(参数为推荐位数据ID)'/>>推荐位扩展数据</a></li>
						<li><a href="javascript:;" <@getAction r'<#assign arrtibuteMap=getPlaceAttributes(placeIds)/>' '多个推荐位扩展数据(参数为多个推荐位数据ID以逗号分隔组成的字符串)'/>>多个推荐位扩展数据</a></li>
						<li><a href="javascript:;" <@getAction r'${getHomeArticleContent(articleId)?no_esc}' '空间文章内容(参数为文章ID)'/>>空间文章内容</a></li>
						<li><a href="javascript:;" <@getAction r'<#assign articleContentMap=getHomeArticleContents(articleIds)/>' '多条空间文章内容(参数为多个文章ID以逗号分隔组成的字符串)'/>>多条空间文章内容</a></li>
						<li><a href="javascript:;" <@getAction r'${getHomeGroupPostContent(postId)?no_esc}' '群组帖子内容(参数为帖子ID)'/>>群组帖子内容</a></li>
						<li><a href="javascript:;" <@getAction r'<#assign arrtibuteMap=getHomeGroupPostContents(postIds)/>' '多条群组帖子内容(参数为多个帖子ID以逗号分隔组成的字符串)'/>>多条群组帖子内容</a></li>
					</ul>
				</li>
				<li>
					<a href="javascript:;">工具方法</a>
					<ul>
						<li><a href="javascript:;" <@getAction r'${getDate(.now,"thisSunday")}' '日期处理(参数1为日期，参数2[thisSunday:本周日,thisMonday:本周一,lastMonday:上周一,lastSunday:上周日]，少于两个参数输出当前时间)'/>>日期处理</a></li>
						<li><a href="javascript:;" <@getAction r'${getDate(.now)}' '日期转数字(参数1为日期)'/>>日期转数字</a></li>
						<li><a href="javascript:;" <@getAction r'${getHtml(url,paramter)}' '获取远程文本内容(参数1为网址，参数2为参数组成的map或字符串消息体，参数2可以为空)'/>>获取远程文本内容</a></li>
						<li><a href="javascript:;" <@getAction r'<#list getKeywords(word) as a>${a}<#sep>,</#list>' '获取文字中的关键词(参数1为字符串内容)'/>>获取文字中的关键词</a></li>
						<li><a href="javascript:;" <@getAction r'${getMd5(value)}' '输出文本MD5加密结果(参数1为字符串)'/>>输出文本MD5加密结果</a></li>
						<li><a href="javascript:;" <@getAction r'${getPage(url,pageIndex)}' '获取静态化页面分页地址(参数1为页面地址，参数2为页码)'/>>获取静态化页面分页地址</a></li>
						<li><a href="javascript:;" <@getAction r'${getRandom(number)}' '输出随机数(参数1为最大值，参数可以为空)'/>>输出随机数</a></li>
						<li><a href="javascript:;" <@getAction r'${getSha1Encode(value)}' '输出文本SHA-1加密结果(参数1为字符串)'/>>输出文本SHA-1加密结果</a></li>
						<li><a href="javascript:;" <@getAction r'${getSleep(second)}' '睡眠一段时间(参数1睡眠时间)'/>>睡眠一段时间</a></li>
						<li><a href="javascript:;" <@getAction r'${getTemplateResult(template)}' '输出模板渲染结果(参数1为Freemarker模板字符串)'/>>输出模板渲染结果</a></li>
						<li><a href="javascript:;" <@getAction r'${getTextFromHtml(html)}' '输出HTML中的文本(参数1为html格式字符串)'/>>输出HTML中的文本</a></li>
						<li><a href="javascript:;" <@getAction r'${getUUID()}' '输出UUID'/>>输出UUID</a></li>
						<li><a href="javascript:;" <@getAction r'getXml(xml)' '获取xml节点(参数1为xml格式字符串)'/>>获取xml节点</a></li>
						<li><a href="javascript:;" <@getAction r'parseUserAgent(value)' '解析UserAgent(参数为1到UserAgent字符串)'/>>解析UserAgent</a></li>
					</ul>
				</li>
			</ul>
		</div>
		<div class="pageFormContent" layoutH="37">
			<ul class="tree treeFolder">
<@_sysConfigList>
	<#list list as a>
				<li>
<#assign field><@_sysConfigFieldList code=a.code><#list list as extend>object.${extend.id.code}:${extend.name}<#sep>,<#else>没有字段</#list></@_sysConfigFieldList></#assign>
					<a href="javascript:;" <@getAction r'<@_sysConfigData code="'+a.code+r'"></@_sysConfigData>' field/>>${a.code}:${a.description!}</a>
				</li>
	<#else>
				<li><a href="javascript:;">没有配置项</a></li>
	</#list>
</@_sysConfigList>
			</ul>
		</div>
		<div class="pageFormContent" layoutH="37">
			<ul class="tree treeFolder">
				<li><a href="javascript:;" <@getAction r'<#list .dataModel?keys as k>${k}<#sep>,</#list>' '打印数据模型变量'/>>打印数据模型变量</a></li>
				<li><a href="javascript:;" <@getAction r'<#list .namespace?keys as k>${k}<#sep>,</#list>' '打印当前数据模型变量'/>>打印当前数据模型变量</a></li>
			</ul>
		</div>
	</div>
</div>